import request from '@/utils/request';

//分页获取节拍报表数据
export const reqMeterList = (paramters) => {
    return request({
        url:"/paceMaintenances/pages",
        method:"get",
        params:paramters
    })
}

export const reqSaveMeter = (paramters) => {
    return request({
        url:"/paceMaintenances",
        method:"post",
        data:paramters
    })
}

export const reqUpdtaeMeter = (paramters) => {
    return request({
        url:"/paceMaintenances",
        method:"put",
        data:paramters
    })
}

export const reqDeleteMeterById = (id) => {
    return request({
        url:"/paceMaintenances/" + id,
        method:"delete"
    })
}

export const reqMeterExport = (paramters) => {
    return request({
        url:"/paceMaintenances/export",
        method:"get",
        responseType:"blob",
        params:paramters
    })
}

//获取初始单班工资
export const reqDefaultSalary = () => {
    return request({
        url:"/paceMaintenances/getAllConfig",
        method:"get"
    })
}

//修改单班工资
export const reqUpdateSalary = (parameter) => {
    return request({
        url:"paceMaintenances/updateSingleShiftWage",
        method:"put",
        data:parameter
    })
}
//通过产品型号获取节拍对象接口(报工时保存几条默认数据)
export const reqOeeInfoByProductModel = (productModel) => {
    return request({
        url:"/paceMaintenances/getByProductModel",
        method:"get",
        params:{
            productModel:productModel
        }
    })
}